DevCodeMetricsConsole is a console application. It is run from a Windows command prompt.
Command line options format:
DevCodeMetricsConsole [Output file name] [Source folder]
Where:
[Ouput file name] Is the optional output filename. If given, it must be the first command line aguement.
The output filename extension determines the output format as:
- XML. Preferred output format. Use this format for use with DevCodeMetricsWeb.
- XLS. Excel worksheet file. Requires Excel installed. Default folder is determined by Excel.
- CSV. Comma separated values file.
Default: metrics.xml (in current folder)
[Source folder] Folder to scan (recursively) for source (code) files. Must be second command line arguement.
Default: Current folder.
At this time only C files are parsed for metrics.
Examples:
DevCodeMetricsConsole
Scans code files in current folder and sub folders. Outputs metrics to file metrics.xml in current folder.
DevCodeMetricsConsole "c:\Captured Metrics\myMetrics.xml" c:\myCode\
Scans folder c:\myCode\ and sub folders for code files. Outputs metrics in XML format to myMetrics.xml in the folder "c:\Captured Metrics\".
DevCodeMetricsConsole c:\myCode\myMetrics.xls
Scans code files in current folder and sub folders. Outputs metrics in Excel format to myMetrics.xls in the folder "c:\myCode\".
To view metrics captured from DevCodeMetricsConsole using DevCodeMetricsWeb, DevCodeMetricsConsole must generated an ouput file metrics.xml and this must be replace the metrics.mxl file in DevCodeMetricsWeb Data folder.
For example if the Data folder was at C:\Inetpub\wwwroot\DevCodeMetricsWeb\Data then the following command would capture metrics from code in c:\myCode\ and update the DevCodeMetricsWeb metrics.xml file.
DevCodeMetricsConsole c:\Inetpub\wwwroot\DevCodeMetricsWeb\Data\Metrics.xml c:\myCode\